<br/>
<button id='print' name='Print'>Print</button><br/><br/>
{% if backnum != 0 %}
<a class='prev-schedule' href='/generate/{{ backnum }}/'>Previous schedule</a>
{% endif %}
<a class='next-schedule' href='/generate/{{ iternum }}/'>Next schedule</a>
<table class='schedule'>
    <tr>
        <td>Time</td>
        <td>Mon</td>
        <td>Tue</td>
        <td>Wed</td>
        <td>Thu</td>
        <td>Fri</td>
    </tr>
    {% for tr in trs %}
        <tr>
        {% for td in tr %}
            {% if 'rowspan' in td.keys %}
            <td class='{{ td.class }}' rowspan='{{ td.rowspan }}'>
            {% else %}
            <td>
            {% endif %}
            {% if 'course' in td.data.keys %}
            {{ td.data.course.department }} {{ td.data.course.number|stringformat:"d" }}
            {{ td.data.sectioncode }} {{ td.data.cs.slot_type }}<br/>
            {{ td.data.course.name|title }}<br/>
            {{ td.data.cs|stringformat:"s" }}
            {% else %}
            {{ td.data|safe }}
            {% endif %}
            </td>
        {% endfor %}
        </tr>
    {% endfor %}
</table>
